﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class FormCalculating : Form
    {
        CalculateNumber cn;
        double value;
        string valueStr;
        public CalculateNumber Cn
        {
            get
            {
                return cn;
            }

            set
            {
                cn = value;
            }
        }

        public FormCalculating()
        {
            InitializeComponent();
            InitNumber();
        }
        //初始化计算类
        private void InitNumber()
        {
            Cn = new CalculateNumber();
            value = cn.value;
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            valueStr = ((Number)sender).numberVal.ToString();
            textBox1.Text = valueStr;
        }

        private void button10_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            int n = 1;
            Number num = new Number();
            num.numberVal = n;
            textBox1_TextChanged(num, e);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            int n = 2;
        }
        private void button3_Click(object sender, EventArgs e)
        {
            int n = 3;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            int n = 4;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            int n = 5;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            int n = 6;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            int n = 7;
        }

        private void button8_Click(object sender, EventArgs e)
        {
            int n = 8;
        }
        private void button9_Click(object sender, EventArgs e)
        {
            int n = 9;
        }
        private void button0_Click(object sender, EventArgs e)
        {
            int n = 0;
        }



    }
}
